<?php
/**
 * User Service
 * User: zng
 * Date: 2019/11/4
 * Time: 14:34
 */
namespace app\admin\service\user;

use app\admin\model\user\Address as AddressModels;

Class Address {

    /**
     * 首页列表
     * @param array $get 筛选条件
     * @return \think\Paginator
     */
    public function indexPaginate( array $get=[] )
    {
        $map = [];
        if ( get($get, 'mobile') ) {
            $map[] = ['mobile', '=', $get['mobile']];
        }
        $pageSize = get($get,'pageSize')>0?$get['pageSize']:20;
        return AddressModels::where($map)
            ->order('id', 'desc')
            ->paginate($pageSize);
    }

}